home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / games / dcgames4.zip / BEGGAR.SCR < prev    next >
Text File  |  1995-10-02  |  1KB  |  55 lines

  1. !
  2. ! Default Beggar script..
  3. !
  4. ! (c) DC Software, 1989-1995
  5. !
  6. ! Pending Enhancements
  7. !
  8. ! - This script has no voices.  For an example of voices, look at
  9. !   MERCHANT.SCR and HEALER.SCR
  10. !   
  11.  
  12. !------------------------------------------------------------------------!
  13. :@TALK ! Talk to the character !
  14. !------------------------------------------------------------------------!
  15.  
  16.   if player.hp = 0 then
  17.     writeln( player.name, " is dead!" );
  18.     STOP;
  19.   endif;
  20.  
  21.   if npc.picture >= 0 then
  22.     viewpcx(npc);
  23.   endif;
  24.  
  25.   loadtext( npc.text ); ! Get the NPC's text block !
  26.   loadvfl( npc.voice ); ! Get the NPC's voice block !
  27. ! First line of the text block is the greeting..
  28.   writeln( s1 );
  29.  
  30.   L1 = select( "Give Money", "Leave" );
  31.   if L1 = 0 then
  32.     readtext( npc.text, random(15)+2 ); ! display one line (2-16) !
  33.   else
  34.     writeln( "Thanks for nothing.." );
  35.     if( group.gold > 50 ) then
  36.       dec( group.gold, random(50) );
  37.     else
  38.       dec( group.gold, group.gold );
  39.     endif;
  40.     writeln( "(the beggar bumps into you as you walk away..)" );
  41.   endif;
  42.   goto XSTOP;
  43.  
  44. !-----------------------------------------------------------------!
  45. ! All STOPs now lead here so the screen can be restored if needed !
  46. !-----------------------------------------------------------------!
  47. :XSTOP
  48.   if npc.picture >= 0 then
  49.     paint(window); ! Assumes the picture fits in the window !
  50.   endif;
  51.   stats(-1); ! Refresh Statistics !
  52.   STOP;
  53.  
  54.  
  55.